hex also implemented in
The goal in hex is simple. Red moves first, and each player alternates placing stones anywhere
on the board. Red tries to form an unbroken chain of stones between top and bottom, blue
between left and right. The first player to achieve an unbroken chain wins. Ties are
mathematically impossible. While the rules are simple, the strategy is
I have implemented an internet two-player hex game in the
programming language. It uses
Jabber, an open XML-based messaging system.
Several steps are needed to set up this program:
Copyright (c) 2002 Eric Rollins
- Download a
and use it to create a Jabber account. Recommend
on Mac OS X. Create 2 accounts if you want to converse with your opponent using
Jabber instant messaging during the game (Hex gets very confused if more than one
conversation is going on with the same user name...).
- Download Python. On Mac OS X use
to install Python (WITH TK SUPPORT) and
XDarwin. Yes, this is painful.
jabber.py Jabber connectivity library for Python.
- From a terminal command prompt in the hex directory, type python hex.py yourUsername yourPassword opponentUsername
- disclaimers: currently the application does not detect victory, must be restarted
after each game, and does not handle network errors gracefully...
- Python Hex has been tested on Mac OS X (Windows & Linux test not done yet). Have Fun.
- and if anyone knows why Fink OS X XDarwin Python generates a Bus Error whenever more than one Tk application is run at the same time, I'd like to know...
Hex comes with Absolutely No Warranty.
This is free software, and you are welcome to
redistribute it under certain conditions
(for details see:GNU General Public License,